package com.manager.car.service;

import java.util.List;

import com.manager.car.dao.INewsDao;
import com.manager.car.po.NewsInfo;
import com.manager.car.util.PageModel;


public class NewsServiceImpl implements INewsService{

private INewsDao dao;
	
	public INewsDao getDao() {
		return dao;
	}

	public void setDao(INewsDao dao) {
		this.dao = dao;
	}

	public NewsInfo get(Integer id) {
		return dao.queryById(id);
	}

	public List<NewsInfo> queryAll(int typeid) {
		return dao.queryAll(typeid);
	}

	public void add(NewsInfo news) {
		dao.save(news);
	}

	public void delete(Integer id) {
		dao.delete(id);
	}

	public void update(NewsInfo news) {
		dao.update(news);
	}

	public PageModel<NewsInfo> queryall(int pageNo, int pageSize, int typeid) {
		return dao.queryall(pageNo, pageSize,typeid);
	}
}
